FROM postgres

WORKDIR /tmp

ADD scws-1.2.3.tar.bz2      scws-1.2.3.tar.bz2
ADD zhparser-v2.3.tar.gz    zhparser-v2.3.tar.gz

RUN apt update && apt install gcc make postgresql-server-dev-18 -y
RUN apt install postgis -y
RUN cd scws-1.2.3.tar.bz2/scws-1.2.3 && ./configure && make && make install
RUN cd zhparser-v2.3.tar.gz/zhparser-2.3 && make && make install
